/**
 * 
 */
package hu.gbalage.owlforms.impl.data;

import java.net.URI;

import hu.gbalage.owlforms.api.data.CompositeValue;
import hu.gbalage.owlforms.api.data.FormData;
import hu.gbalage.owlforms.api.data.PrimitiveValue;

/**
 * @author balage
 *
 */
public class CompositeValueImpl implements CompositeValue {

	private final FormData data;
	
	/**
	 * 
	 */
	public CompositeValueImpl(FormData data) {
		this.data = data;
	}

	/* (non-Javadoc)
	 * @see hu.gbalage.owlforms.api.data.CompositeValue#getCompositeData()
	 */
	public FormData getCompositeData() {
		return data;
	}

	/* (non-Javadoc)
	 * @see hu.gbalage.owlforms.api.data.FieldValue#getType()
	 */
	public URI getType() {
		return data.getURI();
	}

	/* (non-Javadoc)
	 * @see hu.gbalage.owlforms.api.data.FieldValue#isPrimitive()
	 */
	public boolean isPrimitive() {
		return false;
	}

	public CompositeValue asCompositeValue() {
		return this;
	}
	
	public PrimitiveValue asPrimitiveValue() {
		return null;
	}
	
}
